/*
 * similarity.cpp
 *
 *  Created on: Jun 22, 2011
 *      Author: Gilad & Yotam
 */

#include "similarity.h"
#include "mtm.h"


Similarity::Similarity(int id, int priority, const Matrix& a, const Matrix& b) :
	Job(id, priority, a, b) {
}
Matrix Similarity::execute() {
	try {
		return (a.inverse() * b * a);
	}
	catch (MatrixExceptions::MatrixException&) {
		throw Job::JobFailed();
	}
}
